package common.enums;

public enum WeightEnum {
	NULL(""),
	BELOW_50KG("below 50kg"),
	FROM_50_TO_75("50-75"),
	FROM_75_TO_100("75-100"),
	ABOVE_100KG("above 100kg");
	
	private String text;
	
	WeightEnum(String text) {
	  this.text = text;
	}
	
	public String getText() {
	  return this.text;
	}
	
	@Override
	public String toString() {
		return getText();
	}
	
	public static WeightEnum fromString(String text) {
	    if (text != null) {
	      for (WeightEnum b : WeightEnum.values()) {
	        if (text.equalsIgnoreCase(b.text)) {
	          return b;
		    }
		  }  
	    }
	    
	    return null;   
	}
}
